import React from 'react';
import { Layout, Menu } from 'antd';

import './index.less'

import { Route, Switch, Link } from "react-router-dom";

import Footer2 from "../../components/Footer2/index"
import Home from '../Home/Home';
import Solution from '../Solution/Solution';
import Activity from '../Activity/Activity';
import SettleIn from '../SettleIn/SettleIn';
import Cluture from '../Culture/Culture';
import Plantform from '../Plantform/Plantform';
import Detail from '../Activity/Detail/detail';
import Work from '../Activity/Work/Work'
import ScrollToTop from '../../components/ScrollToTop/ScrollToTop'; //判断是否需要移动到top


const { Header } = Layout;
export default class index extends React.Component {
    state = {}
    render() {
        return (
            <div>
                <div style={{ position: 'fixed', zIndex: 1, width: '100%', backgroundColor: '#fff' }}>
                    <Header className="header">
                        <div className="logo" />
                        <Menu mode="horizontal" defaultSelectedKeys={['1']} style={{ float: 'right', paddingRight: 160 }}>
                            <Menu.Item key="1">
                                <Link to='/'>首页</Link>
                            </Menu.Item>
                            <Menu.Item key="2">
                                <Link to='/solution'>解决方案</Link>
                            </Menu.Item>
                            <Menu.Item key="3">
                                <Link to='/activity'>活动专题</Link>
                            </Menu.Item>
                            <Menu.Item key="4">
                                <Link to='/settlein'>企业入驻</Link>
                            </Menu.Item>
                            <Menu.Item key="5">
                                <Link to='/culture'>企业文化</Link>
                            </Menu.Item>
                            <Menu.Item key="6">
                               <a href="http://xbbzp.com/learnhome" target="_blank">智慧培训平台</a>
                            </Menu.Item>
                            <Menu.Item key="7">
                               <a href="http://xbbhr_admin.weichaoxi.com/#/login " target="_blank">人事派遣</a>
                            </Menu.Item>
                        </Menu>
                    </Header>

                </div>
                <div style={{ paddingTop: 60 }}>
                    <ScrollToTop>
                    <Switch>
                            <Route path='/solution' component={Solution} />
                            <Route path='/activity' component={Activity} />
                            <Route path='/detail' component={Detail} />
                            <Route path='/work' component={Work} />
                            <Route path='/settlein' component={SettleIn} />
                            <Route path='/culture' component={Cluture} />
                            <Route path='/plantform' component={Plantform} />
                            <Route component={Home} />
                        </Switch>
                    </ScrollToTop>
                     
                    <Footer2 />
                </div>

            </div>
        )
    }
}